﻿using Microsoft.AspNetCore.Http;
using QMERP.Domain;
using QMERP.Domain.Dtos;
using QMERP.Domain.PrintModels;
using QMERP.Infrastructure.CustomException;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QMERP.Application.Services
{
    public interface IBulkOrderService
    {
        /// <summary>
        /// 批量订单窗体
        /// </summary>
        /// <returns></returns>
        Task<PageResponse<BulkOrderResponse>> Query(PageRequest<BulkOrderRequest> request);
        /// <summary>
        /// 获取id的批量订单详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<BulkOrderResponse> Detail(long id);
        /// <summary>
        /// 批量保存
        /// </summary>
        /// <param name="request"></param>
        /// <param name="isCheck"></param>
        /// <returns></returns>
        Task<BulkOrderResponse> Save(BulkOrderSaveRequest request, bool isCheck = false);
        /// <summary>
        /// 批量订单审核
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task Check(long[] ids);
        /// <summary>
        /// 批量订单弃审
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task UnCheck(long[] ids);
        /// <summary>
        /// 批量订单取消
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task Cancel(long[] ids);
        /// <summary>
        /// 批量订单完成
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task Finish(long[] ids);
        /// <summary>
        /// 获取批量订单主要信息列表
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<List<BulkOrderMainInfoResponse>> GetBulkOrderMainInfos(PageRequest<BulkOrderRequest> request);
        /// <summary>
        /// 批量出库
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<List<LeaveStockOrderResponse>> BatchLeaveStock(long[] ids);
        /// <summary>
        /// 获取发票数据
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<List<BulkOrderInvoice>> GetInvoices(long[] ids);
        /// <summary>
        /// 导入单光毛料数据转换为BulkOrderDetail_MonofocalMaterialDetailResponses
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        List<BulkOrderDetail_MonofocalMaterialDetailResponse> ImportMonofocalMaterial(IFormFile file);
        /// <summary>
        /// 导入双光毛料数据转换为BulkOrderDetail_BifocalMaterialDetailResponses
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        List<BulkOrderDetail_BifocalMaterialDetailResponse> ImportBifocalMaterial(IFormFile file);
    }
}
